package com.ruoyi.projects.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.projects.mapper.SlOperateLogMapper;
import com.ruoyi.projects.domain.SlOperateLog;
import com.ruoyi.projects.service.ISlOperateLogService;

/**
 * 实操记录Service业务层处理
 * 
 * @author yangz
 * @date 2024-12-02
 */
@Service
public class SlOperateLogServiceImpl implements ISlOperateLogService 
{
    @Autowired
    private SlOperateLogMapper slOperateLogMapper;

    /**
     * 查询实操记录
     * 
     * @param operateId 实操记录主键
     * @return 实操记录
     */
    @Override
    public SlOperateLog selectSlOperateLogByOperateId(Long operateId)
    {
        return slOperateLogMapper.selectSlOperateLogByOperateId(operateId);
    }

    /**
     * 查询实操记录列表
     * 
     * @param slOperateLog 实操记录
     * @return 实操记录
     */
    @Override
    public List<SlOperateLog> selectSlOperateLogList(SlOperateLog slOperateLog)
    {
        return slOperateLogMapper.selectSlOperateLogList(slOperateLog);
    }

    /**
     * 新增实操记录
     * 
     * @param slOperateLog 实操记录
     * @return 结果
     */
    @Override
    public int insertSlOperateLog(SlOperateLog slOperateLog)
    {
        slOperateLog.setCreateTime(DateUtils.getNowDate());
        return slOperateLogMapper.insertSlOperateLog(slOperateLog);
    }

    /**
     * 修改实操记录
     * 
     * @param slOperateLog 实操记录
     * @return 结果
     */
    @Override
    public int updateSlOperateLog(SlOperateLog slOperateLog)
    {
        slOperateLog.setUpdateTime(DateUtils.getNowDate());
        return slOperateLogMapper.updateSlOperateLog(slOperateLog);
    }

    /**
     * 批量删除实操记录
     * 
     * @param operateIds 需要删除的实操记录主键
     * @return 结果
     */
    @Override
    public int deleteSlOperateLogByOperateIds(Long[] operateIds)
    {
        return slOperateLogMapper.deleteSlOperateLogByOperateIds(operateIds);
    }

    /**
     * 删除实操记录信息
     * 
     * @param operateId 实操记录主键
     * @return 结果
     */
    @Override
    public int deleteSlOperateLogByOperateId(Long operateId)
    {
        return slOperateLogMapper.deleteSlOperateLogByOperateId(operateId);
    }
}
